package com.minimalist.common.entity.lindi.enums;

/**
 * 林地指标平台_合同模板字段配置枚举
 *
 * @author 11987
 * @since 2025-05-31
 */
public class LindiContractTemplateFieldEnum {

    /**
     * 字段类型枚举
     */
    public enum FieldTypeEnum {
        TEXT("text", "文本"),
        NUMBER("number", "数字"),
        DATE("date", "日期"),
        SELECT("select", "下拉选择"),
        TEXTAREA("textarea", "多行文本"),
        CHECKBOX("checkbox", "复选框"),
        RADIO("radio", "单选框");

        private final String code;
        private final String desc;

        FieldTypeEnum(String code, String desc) {
            this.code = code;
            this.desc = desc;
        }

        public String getCode() {
            return code;
        }

        public String getDesc() {
            return desc;
        }
    }

    /**
     * 是否必填枚举
     */
    public enum RequireEnum {
        OPTIONAL(0, "选填"),
        REQUIRED(1, "必填");

        private final Integer code;
        private final String desc;

        RequireEnum(Integer code, String desc) {
            this.code = code;
            this.desc = desc;
        }

        public Integer getCode() {
            return code;
        }

        public String getDesc() {
            return desc;
        }
    }

    /**
     * 错误信息枚举
     */
    public enum ErrorMsgEnum {
        CONTRACT_TEMPLATE_FIELD_NOT_FOUND("合同模板字段不存在"),
        ADD_CONTRACT_TEMPLATE_FIELD_ERROR("添加合同模板字段失败"),
        UPDATE_CONTRACT_TEMPLATE_FIELD_ERROR("更新合同模板字段失败"),
        DELETE_CONTRACT_TEMPLATE_FIELD_ERROR("删除合同模板字段失败"),
        FIELD_KEY_EXISTS("字段标识已存在"),
        INVALID_FIELD_TYPE("无效的字段类型"),
        INVALID_POSITION("无效的字段位置坐标");

        private final String desc;

        ErrorMsgEnum(String desc) {
            this.desc = desc;
        }

        public String getDesc() {
            return desc;
        }
    }
}
